import http from '@/http'
import qs from 'qs'

// 商户管理相关

// 获取商户审核列表
const merchantList = (params) => {
    return http.get('v1/merchants', {
        params,
        paramsSerializer: function (params) {
            return qs.stringify(params, { arrayFormat: 'brackets' })
        },
    })
}

// 冻结||解冻商户
const thawOrfrozenMerchant = ({ id, params }) => {
    return http.put(`v1/merchants/${id}/enable`, params)
}

export { merchantList, thawOrfrozenMerchant }